<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'searchBook.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
		<center>
			<h1>查询图书</h1>
   		 <form action="searchBook!searchBook" method="post">
   				<label>图书名称：</label>
	  			<input type="text" name="book.bookName" >
	  			<label>图书状态：</label>
			  	<select name="state">
			  		<option value="a">所有</option>
			  		<option value="b">未借出</option>
			  		<option value="c">已借出</option>
			  	</select>
			  	<input type="submit" value="查询">
  		</form>
  		<table border="1" width="60%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px;margin-top:8px;">
		<tr>
			<th>ISBN</th>
			<th>书名</th>
			<th>作者</th>
			<th>价格</th>
			<th>状态（0表示未借出，1表示借出）</th>
		</tr>
	<s:iterator value="data" status="st" var="book">
		<tr align="center" >
			<td><s:property value="#book.isbn"/></td>
			<td><s:property value="#book.bookName"/></td>
			<td><s:property value="#book.author"/></td>
			<td><s:property value="#book.price"/></td>
			<td><s:property value="#book.state"/></td>
		</tr>
		</s:iterator>
	</table>
	</center>
  </body>
</html>
